package com.aisi.commonService.exception;

import com.aisi.model.vo.common.ResultCodeEnum;
import lombok.Data;

/**
 * @Author: shenjianZ
 * @Date: 2024/2/16 20:55
 * @Description:
 */

@Data
public class AiSiException extends RuntimeException {
    private Integer code;
    private String message;
    private ResultCodeEnum resultCodeEnum;
    public AiSiException(ResultCodeEnum resultCodeEnum){
        this.resultCodeEnum = resultCodeEnum;
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
    public AiSiException(Integer code,String message){
        this.code = code;
        this.message = message;
    }
}
